From d9a9535ea8f38a1d63a7accd77e7175d5b822284 Mon Sep 17 00:00:00 2001
From: real-zephex <zephex-1@outlook.com>
Date: Fri, 29 Mar 2024 14:38:23 +0530
Subject: fix: manga page now indicates what chapter you are reading

---
 .../manga/[title]/[id]/[read]/currentReading.jsx   | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 src/app/manga/[title]/[id]/[read]/currentReading.jsx

(limited to 'src/app/manga/[title]/[id]/[read]/currentReading.jsx')

diff --git a/src/app/manga/[title]/[id]/[read]/currentReading.jsx b/src/app/manga/[title]/[id]/[read]/currentReading.jsx
new file mode 100644
index 0000000..c368f75
--- /dev/null
+++ b/src/app/manga/[title]/[id]/[read]/currentReading.jsx
@@ -0,0 +1,27 @@
+"use client";
+import { useState, useEffect } from "react";
+import styles from "./read.module.css";
+
+export default function CurrentReading() {
+	const [chapter, setChapter] = useState(null);
+	const [volume, setVolume] = useState(null);
+
+	useEffect(() => {
+		setChapter(localStorage.getItem("chapter") || "");
+		setVolume(localStorage.getItem("volume") || "");
+	});
+
+	return CR(chapter, volume);
+}
+
+function CR(chapter, volume) {
+	return (
+		<div className={styles.CurrentReadingContainer}>
+			{chapter && volume && (
+				<p>
+					Vol {volume} Chapter {chapter}
+				</p>
+			)}
+		</div>
+	);
+}
-- 
cgit v1.2.3

